<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .container {
      background: red;
    }
    .left {
      float: left;
    }

    .clear {
      overflow: hidden;
    }
  </style>
</head>
<body>
  <div class="container clear">
    <img class="left" src="https://img2.baidu.com/it/u=1260453923,383607234&fm=26&fmt=auto&gp=0.jpg" alt="">
    <p class="clear">this is a  part of text</p>
  </div>


  <script src="./test.js"></script>
</body>
</html>